
<form name="editForm" role="form" novalidate ng-submit="vm.save()">

    <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true"
                ng-click="vm.clear()">&times;</button>
        <h4 class="modal-title" id="myTokenLabel" data-translate="gatewayApp.token.home.createOrEditLabel">Create or edit a Token</h4>
    </div>
    <div class="modal-body">
        <jhi-alert-error></jhi-alert-error>
        <div class="form-group" ng-show="vm.token.id">
            <label for="id" data-translate="global.field.id">ID</label>
            <input type="text" class="form-control" id="id" name="id"
                    ng-model="vm.token.id" readonly />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.token.accessToken" for="field_accessToken">Access Token</label>
            <input type="text" class="form-control" name="accessToken" id="field_accessToken"
                    ng-model="vm.token.accessToken"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.token.expiresIn" for="field_expiresIn">Expires In</label>
            <input type="number" class="form-control" name="expiresIn" id="field_expiresIn"
                    ng-model="vm.token.expiresIn"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.token.time" for="field_time">Time</label>
            <input type="number" class="form-control" name="time" id="field_time"
                    ng-model="vm.token.time"
                     />
        </div>
        <div class="form-group">
            <label class="control-label" data-translate="gatewayApp.token.tokenType" for="field_tokenType">Token Type</label>
            <select class="form-control" name="tokenType" ng-model="vm.token.tokenType" id="field_tokenType">
                <option value="GLOBAL" data-translate="gatewayApp.TokenType.GLOBAL">GLOBAL</option>
                <option value="JS" data-translate="gatewayApp.TokenType.JS">JS</option>
            </select>
        </div>

        <div class="form-group">
            <label data-translate="gatewayApp.token.mp" for="field_mp">Mp</label>
            <select class="form-control" id="field_mp" name="mp" ng-model="vm.token.mpId" ng-options="mp.id as mp.id for mp in vm.mps"            >
                <option value=""></option>
            </select>
        </div>
    </div>
    <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal" ng-click="vm.clear()">
            <span class="glyphicon glyphicon-ban-circle"></span>&nbsp;<span data-translate="entity.action.cancel">Cancel</span>
        </button>
        <button type="submit" ng-disabled="editForm.$invalid || vm.isSaving" class="btn btn-primary">
            <span class="glyphicon glyphicon-save"></span>&nbsp;<span data-translate="entity.action.save">Save</span>
        </button>
    </div>
</form>
